95a9c2
@@ -1346,7 +1346,11 @@
public class HLog implements Syncable {
             recoverFileLease(fs, logPath, conf);
             parseHLog(log, editsByRegion, fs, conf);
             processedLogs.add(logPath);
-           } catch (IOException e) {
+          } catch (EOFException eof) {
+            // truncated files are expected if a RS crashes (see HBASE-2643)
+            LOG.info("EOF from hlog " + logPath + ".  continuing");
+            processedLogs.add(logPath);
+          } catch (IOException e) {
              if (skipErrors) {
                LOG.warn("Got while parsing hlog " + logPath +
                  ". Marking as corrupted", e);
@@ -1592,8 +1596,8 @@
public class HLog implements Syncable {
         queue.addLast(entry);
         editsCount++;
       }
-      LOG.debug("Pushed=" + editsCount + " entries from " + path);
     } finally {
+      LOG.debug("Pushed=" + editsCount + " entries from " + path);
       try {
         if (in != null) {
           in.close();
